Predictive model for urosepsis in patients with Upper Urinary Tract Calculi based on ultrasonography and urinalysis using artificial intelligence learning

ABSTRACT Purpose To construct a predicting model for urosepsis risk for patients with upper urinary tract calculi based on ultrasound and urinalysis. Materials and Methods A retrospective study was conducted in patients with upper urinary tract calculi admitted between January 2016 and January 2020. The patients were randomly grouped into the training and validation sets. The training set was used to identify the urosepsis risk factors and construct a risk prediction model based on ultrasound and urinalysis. The validation set was used to test the performance of the artificial neural network (ANN). Results Ultimately, 1716 patients (10.8% cases and 89.2% control) were included. Eight variables were selected for the model: sex, age, body temperature, diabetes history, urine leukocytes, urine nitrite, urine glucose, and degree of hydronephrosis. The area under the receiver operating curve in the validation and training sets was 0.945 (95% CI: 0.903-0.988) and 0.992 (95% CI: 0.988-0.997), respectively. Sensitivity, specificity, and Yuden index of the validation set (training set) were 80.4% (85.9%), 98.2% (99.0%), and 0.786 (0.849), respectively. Conclusions A preliminary screening model for urosepsis based on ultrasound and urinalysis was constructed using ANN. The model could provide risk assessments for urosepsis in patients with upper urinary tract calculi.


INTRODUCTION
Urosepsis is a life-threatening organ dysfunction caused by the dysregulated host response to infection originating from the urinary tract and/ or male genital organs (1). The latest definition states that urosepsis is more severe than an uncomplicated urinary infection, implying the need for prompt recognition and intervention (2). Urosepsis must be diagnosed early and treated promptly to prevent progression to septic shock and multiple organ dysfunction (3,4). Upper urinary tract obstruction caused by calculi is an important cause of urosepsis (5). Currently, most of the studies focus on the risk factors of urosepsis following endoscopic lithotripsy (6)(7)(8). However, in the clinic, many patients are diagnosed with upper urinary tract calculi complicated with urosepsis before or after admission (9). Therefore, the early identification of high-risk upper urinary tract calculi patients at risk of developing urosepsis and the implementation of effective intervention methods have become a priority recognized by the World Health Organization (2,10).
Ultrasound is a common emergency imaging technique in patients presenting severe loin pain and fever. It can reveal the size, location, and degree of obstruction of urinary calculi and also help evaluate complications of acute pyelonephritis, such as renal abscess, emphysematous pyelonephritis, and perirenal abscess (11,12). Urinalysis, including the assessment of white and red blood cells and nitrite, can reflect the urinary inflammatory response quickly. It is recommended as a routine detection and suggested for repetitive analysis. In addition, urine culture and antimicrobial susceptibility testing must be performed in all cases of pyelonephritis (13).
Nowadays, artificial intelligence is commonly used in disease diagnosis, treatment, and prognosis prediction (14,15). Artificial neural network (ANN) is the most popular method for machine learning. It is a kind of non-parametric modeling technique, which is suitable for complex phenomenon that investigators do not know underlying functions. ANN is in analogue to the human brain. There are input and output signals transmitting from input to output nodes. Input signals are weighted before reaching output nodes according to their respective importance. Then the combined signal is processed by activation function. ANN has better predictive performance and can grasp the inherent data patterns more effectively than traditional statistical methods (16,17). It has been applied widely in urological practice, including distinction between tumor grade or subtype of genitourinary malignancies, prediction of treatment response, tumor recurrence, and patient survival. The most common ANN application in urolithiasis is in the prediction of endourologic surgical outcomes and stone-free status after Extracorporeal Shock Wave Lithotripsy (18,19). Currently, no studies using ANN data mining approach to explore the risk of upper urinary tract calculi complicated with urosepsis are available.
This study aimed to construct a urosepsis risk prediction model based on ultrasound and urinalysis for patients with upper urinary tract calculi using the ANN data mining approach. This model can be used as a preliminary screening tool to identify patients who are at high risk of urosepsis and be helpful in guiding targeted examinations or interventions.

Study design and population
This retrospective study included patients with upper urinary tract calculi admitted to Shantou Central Hospital between January 2016 and January 2020. The inclusion criteria were 1) imaging results, including urinary system ultrasound, excretory urogram, or abdominopelvic computed tomography (CT) indicating a diagnosis of ureteral calculi, and 2) complete medical history, laboratory, and imaging data available. The exclusion criteria were 1) <14 years of age or pregnancy (women), 2) bilateral upper urinary calculi, 3) diseases of the blood or immune system, malignancy, or use of immunoregulatory therapy, or 4) other sites of primary infection, including lung or abdomen. Urosepsis was diagnosed based on the guidelines for diagnosis and treatment of urosepsis in 2018 (2).
The study followed the Declaration of Helsinki and was approved by the ethics committee for medical research at Shantou Central Hospital (IRB Number: 2019-sci-No.070). Due to the retrospective nature of the study, the requirement for informed consent was waived by the ethics committee.

Data collection
Data including sex, age, body temperature, abdominal pain, hematuria, urinary irritation symptoms, hypertension, diabetes, calculi surgery history, urine leukocytes (U-LEU), urine nitrite (U-NIT), urine erythrocytes (U-ERY), urine glucose (U-GLU), laterality of calculi, location of calculi, degree of hydronephrosis, and the maximal diameters of calculi were collected from medical records. Urinalysis was performed on a Mindray (UA-5800) automatic dry chemi-cal urine analyzer and matching test strips. Ultrasound analysis was performed on a Hitachi (EUB 5500) full digital color Doppler ultrasound diagnostic system.

Sample sets for ANN development and validation
For ANN model construction and validation, the patients were randomized into the training (1214 patients; 135 cases and 1079 controls) and validation (502 patients; 51 cases and 451 controls) sets ( Figure-1). Randomization was performed using SPSS 25.0 (IBM, Armonk, NY, USA).

Selection of the variables for ANN model development
Univariable and multivariable logistic regression analyses were performed to evaluate variables associated with urosepsis and generate the ANN model for the training set. Variables with p<0.05 were selected for predictive model establishment.

Development of the ANN model
A standard feed-forward backpropagation neural network (BPNN) was applied, consisting of three layers: an input layer that receives informa- tion, a hidden layer that processes information, and an output layer that calculates results. BPNN was run with significant predictors as input variables and urosepsis risk as the output variable. The number of neurons in the input layer was the total number of covariables. The output variable was dichotomous (two neurons in the output layer). The number of neurons in the hidden layer was not an actual variable. The optimal H was determined by trial and error since no authoritative theory is available. The optimal hidden layer was determined from the predictive model with the highest sensitivity and specificity. In BPNN, the variables of the upper layer were weighted and related to the next layer by transfer functions. In the constructed BPNN, hyperbolic tangent functions were used as the transfer functions of the hidden layers, and Sof-tMax functions were used as transfer functions for the output layers. Training parameters, including learning rate and momentum, were set at the default values. The networks were trained at a maximum of 100 epochs or until the minimum average square error was <0.001.

Validation of the ANN model
The accuracy, positive (PPR) and negative (NPR) predictive rates, sensitivity, specificity, Youden Index, and area under the receiver operating characteristics (ROC) curve (AUC) were determined in both sets. The Hosmer-Lemeshow goodness-of-fit test was performed for ANN model calibration (p>0.05).

Statistical analysis
Normally distributed continuous variables were presented as means ± standard deviation (SD). Categorical were presented as numbers and proportions. Student's t-test and Pearson chi-square test were used to analyze continuous and categorical variables, respectively. SPSS 25.0 (IBM, USA) was used for data analysis. Two-tailed p<0.05 was considered statistically significant.  (Table-2).

Initially
An ANN model was built based on the significantly associated variables. The input variables were the eight significant variables mentioned above, and the output variable was dichotomous (urosepsis or not). The ANN model consisted of an input layer, a hidden layer, and an output layer. The input and output layers contained 22 and two neurons, depending on the number of input and output variables, respectively. The number of neurons in the hidden layer was calculated automatically according to the model's architecture, including the number of hidden layers and the activation function of the hidden layer and output layer. Each neuron in the different layers was connected by a mathematical function that simulates synapses. Finally, a 3-layer BPNN model with 22, nine, and two neurons in the input, hidden, and output layers, respectively, was constructed as the best predictive model (Figure-2).
The ROC AUC was used to validate the ANN model. The AUCs of the training (Figure-3a)

DISCUSSION
The present study developed a prediction model for urosepsis using ANN, involving eight significant predictors, including sex, age, diabetes history, body temperature, U-LEU, U-NIT, U-GLU, and degree of hydronephrosis. The ANN model showed encouraging outcomes regarding its ability in the early identification of urosepsis in patients with upper urinary tract calculi urosepsis based on ultrasound and urinalysis. The prediction model could be a rapid, clinically applicable risk assessment method to predict urosepsis in patients with upper urinary tract calculi.

Figure 3 -ROC curve and calibration of the nomogram for predicting urosepsis for upper urinary tract calculi patients. (a) ROC curve in the training set; (b) ROC curve in the validation set. Calibration curve of the ANN model for the training set (c) and the validation set (d).
Recent studies consistently found the superiority of the ANN analysis over traditional statistical methods (18). In this study, the ANN model was proved to have a better performance compared to the Nomogram model, which was used to predict probability of patients with ureteral calculi developing into urosepsis in a previous study (9). The AUC values of the ANN model and Nomogram model in the training (validation) groups were 0.992 (0.945) and 0.914 (0.874) respectively. Compared to conventional regression methods, ANN did not require a predefined mathematical relationship between the dependent and independent variables, and could model any arbitrarily complicated nonlinear relationship (20). Theoretically, the ANN model could be built more accurately and perfectly by increasing the sample size and repeated training. These advantages enable ANN to be a useful tool in solving the complex challenge of prediction.
Few clinical studies assessed the probability of patients with upper urinary calculi developing urosepsis (9,21). The risk factors for upper urinary tract calculi complicated by urosepsis remain unclear. In this study, we revealed age, fever, urinary white blood cells, urinary nitrite, urinary glucose, and hydronephrosis were independent risk factors for urosepsis in upper urinary calculi patients. Aging is often accompanied by liver, kidney, cardiovascular, and immune system dysfunctions. Older patients often have comorbidities, including hypertension and diabetes. Once ureteral obstruction occurs, they are prone to secondary infections and progress to systemic in-flammatory response syndrome and even sepsis (22,23). This study suggested that body temperature alterations in patients with upper urinary tract calculi could also independently predict urosepsis. Fever occurs in response to endogenous and/or exogenous pyrogenic substances, including lipopolysaccharide (LPS) produced by Gram-negative bacteria (24). Most patients with sepsis have a fever, while only 10%-29% of the patients are hypothermic, showing even higher disease severity and mortality rate (25).
Consistent with previous studies (9,26), two infection-related indicators in urinalysis, U--LEU and U-NIT, were confirmed as independent risk factors for urosepsis in patients with upper urinary tract calculi. Positive urine culture is also associated with urosepsis (7,8). However, in this study, urine culture was not selected as a candidate risk factor due to its hysteresis characteristic. In the clinic, urine culture often takes 2-3 days or more to produce results, which is inconsistent with the purpose of this study to identify high-risk patients with urosepsis as soon as possible. Positive U-LEU often indicates purulent inflammation of the urinary tract, whose commonest cause is bacterial infections. In addition, Gram-negative bacilli in the urinary tract reduce nitrate, a protein metabolite in urine, to nitrite. Therefore, U-LEU and U-NIT detection can quickly and indirectly determine the possibility of bacterial infection in the urinary system (27,28).
The common causes of U-GLU positivity include elevated blood glucose and decreased renal glucose threshold. When blood glucose rises and exceeds the upper limit of renal tubular reabsorption, glucose is excreted in the urine, resulting in positive U-GLU. In addition, some kidney diseases also decrease the ability of renal tubules to reabsorb glucose. In this case, even if the blood glucose is normal, U--GLU positivity occurs (29). This study found that U-GLU 2+ and 3+ were risk factors for urosepsis. Positive U-GLU of 2+ or 3+ indicates poor control of diabetes or the possibility of chronic kidney disease. Once a patient suffers from urinary tract infection, the risk of developing into urosepsis is higher.
Among ultrasound-related indicators, only the degree of hydronephrosis independently predicted urosepsis. Hydronephrosis mainly indicates urinary tract obstruction. Once the patients have urinary tract infections, bacteria in the urine retrograde into the blood after reaching a certain pressure, resulting in urosepsis (30). Interestingly, this study showed that severe hydronephrosis was negatively correlated with urosepsis risk. Urosepsis commonly appears as an acute course. Severe hydronephrosis indicates a tight and prolonged obstruction, which makes it difficult for bacteria to cause retrograde infection.
This study had limitations. Firstly, it was a retrospective observational study with unavoidable selection bias. However, strict eligibility criteria were adopted. In addition, we randomly composed the training and validation sets to minimize selection bias. Secondly, the training and validation sets were from the same population, so the model might not be generalizable. Therefore, large multicenter studies are needed. Thirdly, the ANN model was based on general information, symptoms, ultrasound, and urinalysis. Data collection, especially for symptoms, was based on self-reports, with inevitable recall bias. Lastly, certain populations were excluded, e.g., patients with bilateral upper urinary calculi. In this study, the inclusion of patients with bilateral upper urinary calculi would lead to difficult grouping, and some indicators could not be well grouped. In addition, the study also excluded people with malignant tumors or immune system diseases because these patients have more interference factors. Although these populations were unsuitable for this study model, they were also those we need to focus on clinically.

CONCLUSIONS
Despite the limitations, this is the first study using ANN to estimate the urosepsis risk for upper urinary tract calculi base on ultrasound and urinalysis. This model could help determine the probability of urosepsis and then perform targeted examinations or interventions, which would be more efficient to improve the efficiency of diagnosis and treatment.

Funding
This work was supported by Medical and Health Science and Technology Project funded by